/***********************************************************************
 * Module:  Tuition.java
 * Author:  penwei
 * Purpose: 学生收费记录
 ***********************************************************************/
package cn.hdmis.entity;

import java.util.Date;
/**
 * 项目名称：hdmis1.1
 * 类名称：Tuition
 * 类描述：学费
 * 创建人：Administrator
 * 创建时间：2013-2-13 下午02:41:13
 * 修改人：Administrator
 * 修改时间：2013-2-13 下午02:41:13
 * 修改备注：
 * @version 1.1
 *
 */
public class Tuition implements java.io.Serializable {

	private static final long serialVersionUID = 7644691620589569925L;
	/**	ID */
	private Integer id;
	/**	学生编号 */
	private Integer studentId;
	/**	费用项目 */
	private Integer costType;
	/**	应收金额 */
	private Double receivable;
	/**	实收金额 */
	private Double collect;
	/**	费用有效期限 */
	private Date beginDate;
	private Date endDate;
	/**	收费时间 */
	private Date currentDate;
	/** 多条收费记录对应一个学生 */
	private Student student;
	
	public Tuition() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * Get value of id
	 * 
	 * @return id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Set value of id
	 * 
	 * @param newId
	 */
	public void setId(Integer newId) {
		this.id = newId;
	}

	/**
	 * Get value of studentId
	 * 
	 * @return studentId
	 */
	public Integer getStudentId() {
		return studentId;
	}

	/**
	 * Set value of studentId
	 * 
	 * @param newStudentId
	 */
	public void setStudentId(Integer newStudentId) {
		this.studentId = newStudentId;
	}

	/**
	 * Get value of costType
	 * 
	 * @return costType
	 */
	public Integer getCostType() {
		return costType;
	}

	/**
	 * Set value of costType
	 * 
	 * @param newCostType
	 */
	public void setCostType(Integer newCostType) {
		this.costType = newCostType;
	}

	/**
	 * Get value of receivable
	 * 
	 * @return receivable
	 */
	public Double getReceivable() {
		return receivable;
	}

	/**
	 * Set value of receivable
	 * 
	 * @param newReceivable
	 */
	public void setReceivable(Double newReceivable) {
		this.receivable = newReceivable;
	}

	/**
	 * Get value of collect
	 * 
	 * @return collect
	 */
	public Double getCollect() {
		return collect;
	}

	/**
	 * Set value of collect
	 * 
	 * @param newCollect
	 */
	public void setCollect(Double newCollect) {
		this.collect = newCollect;
	}

	/**
	 * Get value of beginDate
	 * 
	 * @return beginDate
	 */
	public java.util.Date getBeginDate() {
		return beginDate;
	}

	/**
	 * Set value of beginDate
	 * 
	 * @param newBeginDate
	 */
	public void setBeginDate(java.util.Date newBeginDate) {
		this.beginDate = newBeginDate;
	}

	/**
	 * Get value of endDate
	 * 
	 * @return endDate
	 */
	public java.util.Date getEndDate() {
		return endDate;
	}

	/**
	 * Set value of endDate
	 * 
	 * @param newEndDate
	 */
	public void setEndDate(java.util.Date newEndDate) {
		this.endDate = newEndDate;
	}

	/**
	 * Get value of currentDate
	 * 
	 * @return currentDate
	 */
	public java.util.Date getCurrentDate() {
		return currentDate;
	}

	/**
	 * Set value of currentDate
	 * 
	 * @param newCurrentDate
	 */
	public void setCurrentDate(java.util.Date newCurrentDate) {
		this.currentDate = newCurrentDate;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {

		if (obj == null)
			return false;

		if (obj == this)
			return true;

		if (!(obj instanceof Tuition))
			return false;
		else{
			Tuition sh = (Tuition)obj;
			return this.getId()==sh.getId();
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		int hashCode = 0;
		if (this.id != null)
			hashCode = 29 * hashCode + id.hashCode();
		if (this.studentId != null)
			hashCode = 29 * hashCode + studentId.hashCode();
		if (this.costType != null)
			hashCode = 29 * hashCode + costType.hashCode();
		if (this.receivable != null)
			hashCode = 29 * hashCode + receivable.hashCode();
		if (this.collect != null)
			hashCode = 29 * hashCode + collect.hashCode();
		if (this.beginDate != null)
			hashCode = 29 * hashCode + beginDate.hashCode();
		if (this.endDate != null)
			hashCode = 29 * hashCode + endDate.hashCode();
		if (this.currentDate != null)
			hashCode = 29 * hashCode + currentDate.hashCode();
		return hashCode;
	}

}